Equation of a line through two points

This is an example of Lagrange Polynomial through 2 points

(a, A)

(b, B)

Projections

Line 1 (a, A)

Line 2 (b, B)

Line 1-2

A = (3.64, -3.98)
B = (8.52, -2.48)
x_A: x(A)
y_A: y(A)
x_B: x(B)
y_B: y(B)
a: y = y_A * (x - x_B) / (x_A - x_B)
b: y = y_B * (x - x_A) / (x_B - x_A)
c = OrthogonalLine(A, xAxis)
d = OrthogonalLine(B, xAxis)
C = Intersect(c, xAxis)
D = Intersect(d, xAxis)
e = Segment(A, C)
f = Segment(B, D)
g = false
h: y = y_A * (x - x_B) / (x_A - x_B) + y_B * (x - x_A) / (x_B - x_A)
m_A: y_A / (x_A - x_B)
c_A: -y_A * x_B / (x_A - x_B)
text1: "y = A \left(  \frac{x - b}{a - b}  \right) = " + (LaTeX[y_A]) + " \left(  \frac{x - " + (LaTeX[x_B]) + "}{" + (LaTeX[x_A]) + " - " + (LaTeX[x_B]) + "}  \right) =\left( " + (LaTeX[m_A]) + "  \right)   x +  \left(  " + (LaTeX[c_A]) + " \right) "
m_B: y_B / (x_B - x_A)
c_B: -y_B * x_A / (x_B - x_A)
text2: "y = B \left(  \frac{x - a}{b - a}  \right) = " + (LaTeX[y_B]) + " \left(  \frac{x - " + (LaTeX[x_A]) + "}{" + (LaTeX[x_B]) + " - " + (LaTeX[x_A]) + "}  \right) =\left( " + (LaTeX[m_B]) + "  \right)   x +  \left( " + (LaTeX[c_B]) + " \right) "
m_{AB}: m_A + m_B
c_{AB}: c_A + c_B
text3: "y = A\left( \frac{x - b}{a - b}  \right) + B\left( \frac{x - a}{b - a}  \right) =\left(  " + (LaTeX[m_{AB}]) + " \right) x + \left(  " + (LaTeX[c_{AB}]) + " \right) "
i = false
j = false
k = false